<template>
  <div class="my-header" :style="{ backgroundColor: bg }">{{ title }}</div>
</template>

<script>
/**
 * 需求:
 *  1.动态显示title
 * 2.动态控制背景
 */
export default {
  props: {
    title: {
      type: String,
      default: '拼刀刀'
    },
    bg: {
      type: String,
      default: 'pink'
    }
  }
}
</script>

<style lang="less" scoped>
.my-header {
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 16px;
  background-color: red;
  color: #fff;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
}
</style>
